<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>四川司法警官职业技术学院</title>
        <link rel="icon" type="image/x-icon" href="/imgs/logo.png">

    <style>
        html,body{
            margin: 0;
            padding: 0;
        }
        .login{
            height: calc(100vh - 145px);
        }
        #app{
            padding-bottom: 0 !important;
        }
        .btn_right>span{
            margin-left: 15px;
        }
        .bg_big .left>h3{
            font-size: 14px;
        }
        .bg_big{
            position: relative;
            min-height: 100%;
        }
        .bg_big .left{
            position: absolute;
            right: 10%;
            top: 40%;
            -webkit-transform: translateY(-50%);
            -moz-transform: translateY(-50%);
            -ms-transform: translateY(-50%);
            -o-transform: translateY(-50%);
            transform: translateY(-50%);
            background-color: white;
            width: 350px;
            padding: 35px;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
        }
        .bg_big .left>p{
            /*pad: 35px;*/
        }
        .bg_big{
            height: calc(100% - 145px);
            width: 100%;
            min-width: 500px;
            background-position: center;
            background-repeat: no-repeat;
            background-size: cover;
        }
        .bg_bottom{
            color: white;
            height: 145px;
            background-color: rgb(102,102,102);

            /*min-height: 200px;*/
        }
        .btn_msg{
            display: flex;
            justify-content: space-between;
            width: 80%;
            align-items: center;
            margin: 0 auto;
            height: 100%;
        }
        .chousemore{
            margin: 35px 0;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }
        .administrator{
            cursor: pointer;
            text-align: right;
            color: #169bd5;
            font-size: 14px;
        }
        .btn_left>p{
            margin: 10px 0;
            font-size: 14px;
        }
        .myButton {
            -moz-box-shadow:inset 0px -3px 7px 0px #29bbff;
            -webkit-box-shadow:inset 0px -3px 7px 0px #29bbff;
            box-shadow:inset 0px -3px 7px 0px #29bbff;
            background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #2dabf9), color-stop(1, #0688fa));
            background:-moz-linear-gradient(top, #2dabf9 5%, #0688fa 100%);
            background:-webkit-linear-gradient(top, #2dabf9 5%, #0688fa 100%);
            background:-o-linear-gradient(top, #2dabf9 5%, #0688fa 100%);
            background:-ms-linear-gradient(top, #2dabf9 5%, #0688fa 100%);
            background:linear-gradient(to bottom, #2dabf9 5%, #0688fa 100%);
            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#2dabf9', endColorstr='#0688fa',GradientType=0);
            background-color:#2dabf9;
            -moz-border-radius:3px;
            -webkit-border-radius:3px;
            border-radius:3px;
            /*border:1px solid #0b0e07;*/
            display:inline-block;
            cursor:pointer;
            color:#ffffff;
            font-family:Arial;
            font-size:15px;
            padding:9px 23px;
            text-decoration:none;
            text-shadow:0px 1px 0px #263666;
        }
        .myButton:hover {
            background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #0688fa), color-stop(1, #2dabf9));
            background:-moz-linear-gradient(top, #0688fa 5%, #2dabf9 100%);
            background:-webkit-linear-gradient(top, #0688fa 5%, #2dabf9 100%);
            background:-o-linear-gradient(top, #0688fa 5%, #2dabf9 100%);
            background:-ms-linear-gradient(top, #0688fa 5%, #2dabf9 100%);
            background:linear-gradient(to bottom, #0688fa 5%, #2dabf9 100%);
            filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#0688fa', endColorstr='#2dabf9',GradientType=0);
            background-color:#0688fa;
        }
        .myButton:active {
            position:relative;
            top:1px;
        }
        input{
            width: 100%;
            border: 1px solid #ccc;
            padding: 10px 5px;
            border-radius: 3px;
            padding-left:5px;
            -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
            -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
            -o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
            transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s
        }
        input:focus{
            border-color: #66afe9;
            outline: 0;
            -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
            box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)
        }
        form{
            width: 100%;
            height: 100%;
        }
        .error{
            font-size: 11px;
            color: red;
        }


    </style>
    <script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
<div id="app">
    <div class="login">
        <form method="post" action="/login">
            <div class="bg_big clearfix" style="background-image: url(/imgs/u14.jpg) ">
                <div class="left fl">
                    <h3>用户登录</h3>
                    <p><input type="text" name="username" placeholder="输入账号"/></p>
                    <p style="margin-top: 20px"><input type="password" name="password" placeholder="输入密码"/></p>
                    <div class="chousemore">
                        <button type="button" class="myButton" style="width:100%;" >登录</button>
                    </div>
                    <div class="error" style="text-align: center;width: 100%">
                        ${message}
                    </div>
                </div>
            </div>
        </form>

        <div class="bg_bottom">
            <div class="btn_msg">
                <div class="btn_left">
                    <p>版权：四川司法警官职业技术学院</p>
                    <p>电话：0838-2502461</p>
                    <p>邮箱：plicke@sfds.com</p>
                    <p>地址：四川省德阳市四川警官职业技术学院</p>
                </div>
                <div class="btn_right">
                    <img src="/imgs/u12.jpg" width="135" height="135" alt="">
                    <span>扫码关注</span>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $(function () {
        $('.myButton').click(function () {
            var username=$('input[name=username]');
            var password=$('input[name=password]');
            if(!username.val()){
                username.closest('p').find('label').remove();
                username.closest('p').append('<label class="error">请输入账号</label>');
                return
            }
            if(!password.val()){
                password.closest('p').find('label').remove();
                password.closest('p').append('<label class="error">请输入密码</label>');
                return
            }
            $('.myButton').attr('disabled','disabled');
            $('form').submit();
        })


    })
</script>
</body>
</html>